var detailVue = new Vue({
    el: '#detail',
    data: {
        httpIconUrl: '',
        name: '',
        avgScore: '0',
        apkSize: '',
        downloadCount: '',
        desp: '',
        preImgs: [],
        recommendApps: [],
        isLoading: true
    },
    ready: function () {
        var that = this;
        that.loadList()
    },
    computed: {
        avgScoreImg: function () {
            return '../images/' +
                this.avgScore +
                '.png'
        }
    },
    methods: {
        DetailsMore: function () {
            $('.app-details-text').css({
                maxHeight: '5000px'
            });
            $('.app-details-more').css({
                display: 'none'
            })
        },
        loadList: function () {
            var that = this;
            var url = 'http://192.168.2.27:8080/appplat/webClient/webGetAppDetail?' +
                'id=' +
                $('body').attr('appid');
            $.get(url, function (res) {
                var data = res.content.items[0];
                that.httpIconUrl = data.httpIconUrl;
                that.name = data.name;
                that.avgScore = data.avgScore;
                that.apkSize = data.apkSize;
                that.downloadCount = data.downloadCount;
                that.desp = data.desp;
                that.preImgs = data.preImgs;
                that.recommendApps = data.recommendApps;
                that.isLoading=false;
            })
        }
    }
});